home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part1 / 3640 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  5.2 KB

  1. Path: felix.teclink.net!usenet
  2. From: rad@teclink.net (rad)
  3. Newsgroups: comp.sys.amiga.misc
  4. Subject: Re: OS features
  5. Date: 31 Jan 1996 02:14:30 GMT
  6. Organization: TECLink Internet Services: info@TECLink.Net
  7. Message-ID: <4950.6603T1192T1630@teclink.net>
  8. References: <4e657d$2db@news.rhrz.uni-bonn.de>
  9. NNTP-Posting-Host: tc1_1.teclink.net
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  11.  
  12.  
  13. >Michael van Elst (mlelstv@serpens.rhein.de) wrote:
  14. >: wayne@focus-systems.on.ca (Wayne Fisher) writes:
  15.  
  16. ><...>
  17. >: >    - new programs' code and data would be protected from access by
  18. >: >    another
  19. >: >      process unless explicitly allowed by the program.
  20.  
  21. >: Kills close to all system functions. You had to write a completely new
  22. >: AmigaOS.
  23.  
  24. >Maybe not. Let's say (as you suggested earlier) that some subsystems
  25. >(e.g. Intuition) have the permission to read and write any memory region.
  26. >Intuition functions would have to check if the pointers received from
  27. >process A point into A's memory and, of course, if they are consistent
  28. >and don't corrupt Intuition's internal data when used (That's a good piece
  29. >of work for the programmers and for Intuition at runtime but I guess it's
  30. >possible).
  31. >Programs which want to browse internal data structures of Intuition are
  32. >either given permission or fail.
  33.  
  34. First intuition is currently called within all the tasks which open it.  In
  35. order to allow intuition to access any memory region all processes with
  36. intuition open (practically all processes) must be able to access any memory
  37. region, or intuition must be changed drastically to run out of a separate
  38. process(es) in which case you add the large overhead of a context switch
  39. for each intuition function call.  The same goes for many other libraries too.
  40.  
  41. ><...>
  42. >: >"much more"? I don't think a few percentages is "much more".
  43.  
  44. >: You forget that memory protection is nothing if you cannot protect
  45. >: the system from invalid parameters to system functions. Most system
  46. >: functions however use shared data structures.
  47.  
  48. >How about this: Write access to a data structure shared between a process
  49. >and Intutition marks the data structure as dirty and Intuition has to
  50. >perform consistency checks again before using it.
  51.  
  52. Are you willing to sacrifice the speed to do these checks on almost every
  53. intiution function call?
  54.  
  55. >: The whole concept of device drivers had to be changed.
  56. >: BOOPSI is dead.
  57. >: System hooks are dead.
  58.  
  59. >Device drivers would have to be a subsystem with the license to kill
  60. >(read/write everything). System hooks would be restricted to programs
  61. >which were given special permission.
  62.  
  63. The problems here are that you are punching wholes in your memory protection
  64. for almost all software out there, and requiring major OS changes... This is
  65. what people have been trying to point out for years.
  66.  
  67. >: >It
  68. >: >just means that you can't pass pointers between processes and the
  69. >: >machine becomes more stable.
  70.  
  71. >: Unfortunately most parameters are passed by pointers. You do have
  72. >: to change everything.
  73.  
  74. >Old programs could use one address space and pass pointers as much as
  75. >they want to. Maybe if A calls PutMsg() it gives the receiving process B
  76. >the permission to read/write its memory. New programs could
  77. >also use PutMsg() but they'd allocate the message from a special pool
  78. >and the other task receives only read/write permission for this pool.
  79. >The private memory of new programs wouldn't have to be in the global
  80. >address space.
  81. >Another difference between old and new programs could be that the memory
  82. >of old programs must not be swapped while new programs can decide for
  83. >each of their pools if it has MEMF_SWAP set or not.
  84.  
  85. Part of the problems with this is current software usually does not allocate
  86. memory for messages separately from everything else leaving the OS guessing at
  87. the size of the messages.  Further messages usually contain pointers to other
  88. blocks of memory outside of the message which may need to be both read and
  89. written by the receiver.  Therefor to support current programs the sender's
  90. entire memory space must be made available to the receiver and further must be
  91. mapped into the exact same address space for the receiver as the sender.
  92. Before you know it every process has access to almost every other processes
  93. memory.
  94.  
  95. The only workable approach I see is to provide enforcer style protection for
  96. old programs (breaks only a few poorly written/tested programs).  All tasks
  97. can read/write all other tasks; however, access of free or non-existant memory
  98. will kill a large percentage of "bad" programs.
  99.  
  100. It may be possible (with great effort) to add new modes of protected memory
  101. for new programs/libraries/devices/resources.  The problems with this are of
  102. course major changes required of the OS, the possible requirement that new
  103. programs only open new libraries/datatypes/devices/resources, the possible
  104. requirement that new libraries/datatypes/devices/resources are never called by
  105. old programs... just to name a few.
  106.  
  107. --------------------------------------------------------------------------
  108. - Richard Deken                   E-Mail: (personal)     rad@teclink.net -
  109. - VLSI design engineer                    (AuE business) rad@aue.com     -
  110. - Advanced Microelectronics       PGP public key available               -
  111. --------------------------------------------------------------------------
  112.  
  113.